package com.lecture.junit.tdd.example;

import java.util.concurrent.atomic.AtomicInteger;

public class AwaitLoginState extends LoginServiceState {

	public AwaitLoginState(AtomicInteger counter) {
		super(counter);
	}
	
	@Override
	protected void handlePasswordFail(LoginServiceInterface context, IAccount acc) {
    	attemptCounter.incrementAndGet();
    	context.setState(acc.getUserName(), new AfterFirstLoginState(attemptCounter));		
	}
}
